bitkeeper revision 1.1574 (4296fa5erB8OK0RVQ0VDZFNWsbl4Qg)
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 27 May 2005 10:45:50 +0000 (10:45 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 27 May 2005 10:45:50 +0000 (10:45 +0000)
xm's pincpu has a problem handling the cpu parameter if the cpu number
is more than one digit. This patch fixes it.
Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
tools/python/xen/xm/main.py

index 34dee133b869260d21888e387cfb4ffa5ff4a392..06aaed84388131df36cec7fd96150a4fec768c33 100644 (file)
@@ -512,7 +512,7 @@ class ProgPincpu(Prog):
         cpus = []
         cpumap = 0
         for c in cpulist.split(','):
-            if len(c) > 1:
+            if c.find('-') != -1:
                 (x,y) = c.split('-')
                 for i in range(int(x),int(y)+1):
                     cpus.append(int(i))